package com.xingda.packing.enums;

import lombok.Getter;

public enum WorkAreaType {
    LEFTAREA(1, "左收线"),
    RIGHTAREA(2, "右收线"),
    LEFSHUNTAREA(3, "左分流区"),
    RIGHSHUNTAREA(4, "右分流区"),
    OTHER(9, "其他");

    public static WorkAreaType getByID(int typeId) {
        for (WorkAreaType value : WorkAreaType.values()) {
            if (value.getTypeId() == typeId) {
                return value;
            }
        }
        return OTHER;
    }

    WorkAreaType(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    @Getter
    private final int typeId;

    @Getter
    private final String typeName;
}
